#ifndef CAMERA_VIEWPORT_H
#define CAMERA_VIEWPORT_H

#include "camera.h"

namespace Camera {

class Viewport : public Camera
{
public:
	Viewport();
	void setPerspective(bool);
	void setLensAngle(float rads);

	bool clicked(int mx, int my) const;
	void zoom(float s);
	void scroll(float x, float y, float z=0);

	void getViewVector(Vector3&) const;
	void getMovementVector(float x, float y, Vector3&) const;
	void getMovementVectorAtDistance(float x, float y, float dist, Vector3&) const;
	
	void getClickVector(float mx, float my, Vector3&) const;
	void getClickSource(float mx, float my, Vector3&) const;

	bool perspective;
	float scale;
 
	int x,y,w,h;
	float n, f;
};

std::ostream& operator << (std::ostream& out, const Viewport&);
std::istream& operator >> (std::istream& in, Viewport&);

} //namespace Camera

#endif
